#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<string.h>
#include<stdlib.h>
#include<unistd.h>
#include<assert.h>
#include<stdio.h>
#include<stdarg.h>

#define MAX 1024
#define BUFF_NONE 0x1
#define BUFF_LINE 0x2
#define BUFF_ALL 0x4

typedef struct MyFile
{
  int fd;
  int flag;
  char outbuffer[MAX];
  int current;
}MyFile;

MyFile* my_fopen(const char *path, const char *mode);
size_t my_fread(void *ptr, size_t size, size_t nmemb, MyFile *stream);
size_t my_fwrite(const void *ptr, size_t size, size_t nmemb,MyFile* stream);
int my_fflush(MyFile* stream);
int my_fclose(MyFile* fp);
int my_printf(const char *format, ...);


